import { requestFn } from './requests';
export const getServices = (api: any, mockPath = '') => {
  const servicesObj: any = {};
  Object.keys(api).forEach(k => {
    const [method, url, contentType] = api[k];
    servicesObj[k] = (params: any, setLoading: any) =>
      requestFn(params, setLoading)(method, mockPath + url, contentType);
  });
  return servicesObj;
};
